<?php
$need_install = true;
$need_connect = true;
$need_admin = true;
include('../inc/prepend.php');

$titre_page = 'Administration';
echo '<h2>Administration</h2>';
echo '<p><strong><a href="add_poll.php">Ajouter un sondage</a></strong></p>';
echo '<ul>';
foreach($Sondages->sondage_keys() as $i) {
	$sondage = $Sondages->sondage($i);
	echo '<li><a href="poll.php?id='.$sondage->id().'"><span style="color:';
	if($sondage->open() == 1) echo '#0b0';
	else echo '#b00';
	echo ';">'.$sondage->title().'</span></a></li>';
	$i++;
}
echo '</ul>';

include(INC_DIR.'template.php');
?>